package com.guanzi.server.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author guanzi
 * @since 2021-06-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("e_order")
@ApiModel(value="Order对象", description="")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "唯一id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "下单用户")
    @TableField("e_user_id")
    private Integer eUserId;

    @ApiModelProperty(value = "所属商家")
    @TableField("e_store_id")
    private Integer eStoreId;

    @ApiModelProperty(value = "菜品详细信息")
    @TableField("food_name")
    private String foodName;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "用餐备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "总价格")
    @TableField("price")
    private Integer price;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss" ,timezone="GMT+8")
    @ApiModelProperty(value = "截止时间")
    @TableField("endTime")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "商家名称")
    @TableField("e_store_name")
    private String eStoreName;

    @ApiModelProperty(value = "用户名称")
    @TableField("e_user_name")
    private String eUserName;

}
